#include<iostream>
using namespace std;
#include"unistd.h"
#include"pipe_mkfifo.hpp"
#include<fcntl.h>
#include<string>


int main()
{
    /*打开信道*/
    int fd = open(FILE_PIPE, O_WRONLY);

    /*写入数据*/
    string line;
    while (1)
    {
        cout << "please Enter@:";
        getline(cin, line);   /*向缓冲区中写入数据*/
        write(fd, line.c_str(), line.size());
    }

    close(fd);
    return 0;
}